
#include <iostream>

#include "Universe.hpp"
#include "ExpressionParser.hpp"

int main(int argc, char *argv[])
{
    if (argc == 3)
    {
        // Knowledge knowledge;
        Universe mainUniverse;
        ExpressionParser expressionParser;
        if (expressionParser.getDataFromFile(argv[1], mainUniverse))
        {
            std::cout << "Parsing data file OK" << std::endl;
            if (expressionParser.getResultFromFile(argv[2], mainUniverse))
            {
                std::cout << "Parsing result file OK" << std::endl;
                mainUniverse.solve();
            }
            else
                std::cerr << "file '" << argv[2] << "' contains invalid syntax. Please correct it." << std::endl;
        }
        else
            std::cerr << "file '" << argv[1] << "' contains invalid syntax. Please correct it." << std::endl;
    }
    else
        std::cout << "Usage: ./sysexp knowledge_file result_file" << std::endl;
}
